// import Home from "@/pages/Home";
// import Search from "@/pages/Search";
// import Login from "@/pages/Login";
// import Register from "@/pages/Register";
// import Detail from "@/pages/Detail";
// import AddCartSuccess from "@/pages/AddCartSuccess";
// import ShopCart from "@/pages/ShopCart";
// import Trade from "@/pages/Trade";
// import Pay from "@/pages/Pay";
// import PaySuccess from "@/pages/PaySuccess";
// import Center from "@/pages/Center";
// import GroupOrder from "@/pages/Center/GroupOrder";
// import MyOrder from "@/pages/Center/MyOrder";

export default [
    {
        path: '/center',
        component: ()=>import("@/pages/Center"),
        children:[
            {
                path:'grouporder',
                component:()=>import("@/pages/Center/GroupOrder")
            },
            {
                path:'myorder',
                component:()=>import("@/pages/Center/MyOrder")
            },
            {
                path:'',
                redirect:'myorder'
            },
        ]
    },
    {
        path: '/paysuccess',
        component: ()=>import("@/pages/PaySuccess")
    },
    {
        path: '/trade',
        component: ()=>import("@/pages/Trade")
    },
    {
        path: '/pay',
        component: ()=>import("@/pages/Pay")
    },
    {
        path: '/shopcart',
        component: ()=>import("@/pages/ShopCart")
    },
    {
        path: '/addcartsuccess',
        component: ()=>import("@/pages/AddCartSuccess")
    },
    {
        path: '/detail/:skuId',
        component: ()=>import("@/pages/Detail")
    },
    {
        path:'/home',
        component:()=>import("@/pages/Home")
    },
    {
        path: '/search/:keyword?',
        component: ()=>import("@/pages/Search"),
        name: 'search',
        // props:true //1.布尔值 只映射params参数
        //props:{username:"lili"}//2.对象形式  映射无关的数据为组件的熟悉
        // props(route) {//3.函数形式 可以映射params参数也可以映射query参数,这个用的多，
        //     //route是映射完的路由对象可以直接获取
        //     return {
        //         keyWord: route.params.keyWord,
        //         keyWord1: route.query.keyWord1
        //     }
        // }
    },
    {
        path:'/login',
        component:()=>import("@/pages/Login"),
        //设置是否隐藏
        meta:{
            isHidden:true
        }
    },
    {
        path:'/register',
        component:()=>import("@/pages/Register"),
        //设置是否隐藏
        meta:{
            isHidden:true
        }
    },
    {
        path:'/',
        component:()=>import("@/pages/Home")
    },
]
